﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using ArchitectingInnovation.PRISMvvM.Core;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ArchitectingInnovation.PRISMvvM.Core.ServiceGateways;

namespace UnitTests
{
    [TestClass]
    public class Tests
    {
        [TestMethod]
        public void async_call_should_queue_and_dequeue_properly()
        {
            //var queue = new ServiceQueue(null);
            //queue.RegisterAction(x =>
            //{
            //    return new Action(DoStuff).BeginInvoke(OnDone, x);
            //    var myClient;
            //    myClient.GetEmployeesCOmpleted += (o, e) =>
            //                                          {
            //                                              ///put in cache.
            //                                              /// e.Result;
            //                                          };
            //    myClient.GetEmployeesAsync();
            //});
            //queue.Execute();
            
        }

        [TestMethod]
        public void view_model_base_property_changed_should_work()
        {
            //var vm = new ViewModelBase<object>(new object());
            //bool success = false;
            //vm.PropertyChanged += (o, e) =>
            //                          {
            //                              if(e.PropertyName == "IsBusy")
            //                              {
            //                                  success = true;
            //                              }
            //                          };
            //vm.IsBusy = true;
            //Assert.IsTrue(success);
        }

        

        public void DoStuff ()
        {
            
        }

        public void OnDone(IAsyncResult result)
        {
            
        }
    }
}
